package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.product.model.BaseCategoryTrademark;
import com.atguigu.gmall.product.model.BaseTrademark;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 分类品牌中间表 Mapper 接口
 *
 * @author atguigu
 * @since 2023-04-18
 */
public interface BaseCategoryTrademarkMapper extends BaseMapper<BaseCategoryTrademark> {

    List<BaseTrademark> getFindCurrentTrademarkList(@RequestParam("category3Id") Long category3Id);
@Delete(
        "DELETE  FROM base_category_trademark bct where bct.category3_id=#{category3Id} and bct.trademark_id = #{trademarkId}"
)
    void deleteCategoryAndTrademark(@RequestParam("category3Id") Long category3Id,@RequestParam("trademarkId") Long trademarkId);
}
